<template>
  <div class="main-chartPanel top">
    <div class="title">
      <img src="../assets/img/menuIco.png" alt="">
      {{ title }}
    </div>
    <div class="content_content">
      <div class="content_content_cen">
        <div class="txt" style="display: flex;align-items: center;justify-content: space-between;">
          <span>{{ chartName }}</span>
          <div v-if="showSelect">
            <select name="" id="mySelect" @change="handleChange">
              <option value="0">供水</option>
              <option value="1">热力</option>
              <option value="2">污水</option>
              <option value="3">雨水</option>
            </select>
          </div>
        </div>
        <slot></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "chartPanel",
  components: {},
  props: ['title', 'chartName', 'showSelect'],
  data() {
    return {
      type: ''
    };
  },
  mounted() {

  },
  methods: {
    handleChange(type) {
      console.log(type)
    }
  },
  watch: {},
  computed: {},
  beforeDestroy() {

  },
}
</script>
<style src="../assets/css/index.css" scoped></style>
<style scoped>
.main-chartPanel {
  position: relative;
  height: 50%;
  width: 100%;
}
</style>
